import { EntitySchema } from '@mikro-orm/core';

export class ImsYzdKpCorePower {
  id!: number;
  basePower!: unknown;
  channelPower!: unknown;
  plugPower!: unknown;
  videoSize!: number;
  audioSize!: number;
  imgSize!: number;
  uniacid!: number;
  expireTime!: string;
  addTime!: string;
  state: number = 1;
  fileSize: number = 0;
}

export const ImsYzdKpCorePowerSchema = new EntitySchema({
  class: ImsYzdKpCorePower,
  properties: {
    id: { primary: true, type: 'number' },
    basePower: { type: 'unknown', columnType: 'longtext' },
    channelPower: { type: 'unknown', columnType: 'longtext' },
    plugPower: { type: 'unknown', columnType: 'longtext' },
    videoSize: { type: 'number' },
    audioSize: { type: 'number' },
    imgSize: { type: 'number' },
    uniacid: { type: 'number', index: 'uniacid' },
    expireTime: { type: 'string', length: 255 },
    addTime: { type: 'string', length: 255 },
    state: { type: 'number', default: 1, index: 'state' },
    fileSize: { type: 'number', default: 0 },
  },
});
